<!DOCTYPE html>
<html style="background-color: #F2F2F2;">
<head>
	
	<title><?php echo _PLATFORM_TITLE_; ?></title>

	<?php $this->setFlag('vue,lazyload,wxshare'); ?>
	<?php $this->import('meta'); ?>

	<link rel="stylesheet" type="text/css" href="html/platformwap/housecraft/css/list.css?v=10" />

    <script type="text/javascript" src="html/platformwap/housecraft/js/list.js?v=12"></script>

</head>
<body>

	<div style="display: none;"></div>
	<div id="loadSpin" class="bg"></div>

	<div id="mainBg" class="bg" style="display: none;">

		<input type="text" id="from" class="display-none" />
		<input type="text" id="sortation" class="display-none" />

		<div class="condition-bar">
        	<div class="title-bar">
				<img class="left-img" src="static/pic/wap/home.png" onclick="toHome()" />
	            <div class="title">家政服务</div>
	            <img class="right-img" src="static/pic/wap/search.png" onclick="openSlipSearchDiv()" />
	        </div>

			<div class="option-bar">
                <div id="optionTab" class="option-tab">
                    <div id="sortationTab" class="tab-item-click" onclick="selectSortation(this, '', 'sortation')">全部</div>
                    <div id="sortationTab0" class="tab-item" onclick="selectSortation(this, '0', 'sortation')">月嫂保姆</div>
                    <div id="sortationTab1" class="tab-item" onclick="selectSortation(this, '1', 'sortation')">清洗保洁</div>
                    <div id="sortationTab2" class="tab-item" onclick="selectSortation(this, '2', 'sortation')">家居清洗</div>
                </div>
			</div>
		</div>
		<div class="empty-area"></div>

		<div class="count-bar">
			共 <span id="listCount" class="count-color">X</span> 条信息
		</div>

		<div id="listBar">
            <div v-bind:id="'housecraftInfo' + info.housecraftid" v-for="info in list">
                <div class="list-bar" v-on:click="viewHousecraft(info.housecraftid)">
                    <div class="list-text">
                        <div class="list-title-bar">
                            <div class="list-title">{{ info.title }}</div>
                        </div>
                        <div class="list-area">{{ info.area }}</div>
                        <div class="list-feature-bar">
                        	<div class="list-feature2">
                        		<template v-if="info.sortation == 0">月嫂保姆</template>
                        		<template v-else-if="info.sortation == 1">清洗保洁</template>
                        		<template v-else-if="info.sortation == 2">家居清洗</template>
		                        <template v-else>--</template>
                        	</div>
                            <div class="list-feature" v-for="feature in info.feature">{{ feature }}</div>
                        </div>
                    </div>
                    <div class="list-pic">
                        <template v-if="info.istop == 1">
                            <img class="list-hot" src="static/pic/wap/hot.png" />
                        </template>
                        <img class="list-logo" v-lazy="info.smallpic" />
                        <div class="list-time">{{ info.difftime }}</div>
                    </div>
                </div>
                <div class="list-separate"></div>
            </div>
        </div>

		<?php $this->import('page'); ?>
		<?php $this->import('totop'); ?>
		<?php $this->import('slipoption'); ?>
		<?php $this->import('slipsearch'); ?>



		<script type="text/javascript">
            var housecraft = new Vue({
                el: '#listBar',
                data: {
                    list: ''
                },
	            mounted() {
	            	Vue.use(VueLazyload);
	            },
	            watch: {
                    list() {
                        this.$nextTick(() => {
                            if (getStorage('housecraft_id') != null && getStorage('housecraft_id') != '') {
                                location.href = '#housecraftInfo' + getStorage('housecraft_id');

                                var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
                                window.scrollTo(0, scrollTop - 180);

                                //重新将 storage 赋值给 input 元素
                                setValue('page', getStorage('housecraft_page'));
                                setValue('sortation', getStorage('housecraft_sortation'));
                                setValue('searchKeyword', getStorage('housecraft_searchKeyword'));

                                //重置条件选项
                                resetOption();
                            }

                            setStorage('housecraft_id', '');
                            setStorage('housecraft_page', '');
                            setStorage('housecraft_sortation', '');
                            setStorage('housecraft_searchKeyword', '');
                        })
                    }
                }
            });
        </script>

	</div>

</body>
</html>